package cn.dnui_001zjs.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.dnui_001zjs.dao.TripDao;
import cn.dnui_001zjs.po.Trip;
import cn.dnui_001zjs.po.TripComment;

@Service
public class TripService {
	@Autowired
	private TripDao tripDao;
	
	public List<Trip> getTripList(){
		return tripDao.getTripList();
		
	}

	public int addTrip(Trip trip) {
		
		return tripDao.addTrip(trip);
	}

	public int delTripByID(Integer tripid) {
		return tripDao.delTripByID(tripid);
	}

	public Trip getTripById(Integer tripid) {
		
		return tripDao.getTripByID(tripid);
	}

	public int updateTrip(Trip trip) {
		
		return tripDao.updateTrip(trip);
	}
	public List<TripComment>getComment(){
		return tripDao.getComment();
	}

}
